<script setup>

import { ref } from 'vue';
const count=ref(0)
const increase=()=>{
    count.value++
}
const decrease=()=>{
    count.value--
}
</script>
<template>
   <div>
     <h2>{{ count }}</h2>
     <p><button @click="increase">加1</button><button @click="decrease">减1</button></p>
   </div>
</template>
<style scoped>

</style>